﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Page>" %>

<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="Buffalo.Lib.Common" %> 

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            string reportFile = Util.ToSafeString(Request["ReportFile"]);
            lnkReportFile.Text = Path.GetFileName(reportFile);
            lnkReportFile.NavigateUrl = @"~\Areas\Tourism\Temp\" + Path.GetFileName(reportFile);
        }
    }
</script>

</head>
<body>
    <ext:ResourceManager ID="ResourceManager1" runat="server">
    </ext:ResourceManager>
    <ext:Viewport ID="mainViewPort" runat="server" Layout="fit">
        <Items>
            <ext:Panel ID="Panel1" runat="server" Border="false" Layout="fit">
                <TopBar>
                    <ext:Toolbar ID="Toolbar1" runat="server">
                        <Items>
                            <ext:Button ID="btnClose" runat="server" Text="Close" Icon="DoorOut">
                                <Listeners>
                                    <Click Handler="parent.ReportViewWindow.hide();" />
                                </Listeners>
                            </ext:Button>
                            <ext:ToolbarFill ID="ToolbarFill1" runat="server" />
                        </Items>
                    </ext:Toolbar>
                </TopBar>
                <Items>
                            <ext:Panel ID="panReport" runat="server" Title="Tour Info" Padding="6" Layout="fit">
                                <Items>
                                    <ext:FormPanel ID="ReportForm" runat="server" Border="false" >
                                        <Items>
                                            <ext:Container ID="Container1" runat="server" Flex="1">
                                                <Items>
                                                    <ext:HyperLink ID="lnkReportFile" runat="server" FieldLabel ="Output: " />
                                                </Items>
                                            </ext:Container>
                                        </Items>
                                    </ext:FormPanel>
                                </Items>
                            </ext:Panel>
                </Items>
            </ext:Panel>

        </Items>

    </ext:Viewport>
</body>
</html>
